﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarterWechatServer.DataEntity.Entities
{
    /// <summary>
    /// 用户第三方登录信息
    /// </summary>
    [Table("UserExtraLogin")]
    public class UserExtraLoginEntity
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// OpenId
        /// </summary>
        [Required]
        [StringLength(128)]
        public string OpenId { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        [ForeignKey("User")]
        public int UserId { get; set; }

        public virtual UserEntity User { get; set; }
    }
}
